package com.ysd.lis.controller.inv;

import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.inv.InvReagent;
import com.ysd.lis.request.inv.InvReagentDto;
import com.ysd.lis.request.inv.InvReagentParam;
import com.ysd.lis.service.inv.InvReagentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-09-12
 */
@Api(tags = "试剂字典")
@RestController
@RequestMapping("/lis/inv/invReagent")
public class InvReagentController extends BaseController {

    @Autowired
    InvReagentService invReagentService;

    @ApiOperation("查询")
    @GetMapping("/findInvReagentList")
    public Result findInvReagentList(InvReagentParam param){
        return invReagentService.findInvReagentList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addInvReagent")
    public Result addInvReagent(@RequestBody InvReagent invReagent){
        return  invReagentService.addInvReagent(invReagent);
    }

    @ApiOperation("修改")
    @PostMapping("/editInvReagent")
    public Result editInvReagent(@RequestBody InvReagent invReagent) {
        return invReagentService.editInvReagent(invReagent);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteInvReagentList")
    public Result batchDeleteInvReagentList(@RequestBody InvReagentDto dto){
        return  invReagentService.batchDeleteInvReagentList(dto);
    }


}
